package lumis.content.workflow.serialization;

import lumis.portal.PortalException;
import lumis.portal.serviceinstance.serialization.ServiceInstanceBaseSerializationContext;
import lumis.portal.serviceinstance.serialization.ServiceInstanceDeserializationContext;
import lumis.portal.serviceinstance.serialization.ServiceInstanceSerializationContext;

/**
 * Manager interface for Workflow serialization
 *
 * @version $Revision: 6239 $ $Date: 2007-03-26 15:50:32 -0300 (Mon, 26 Mar 2007) $
 * @since 4.0.7
 */
public interface IWorkflowSerializationManager
{
	// DESERIALIZATION
	
	/**
	 * Deserialize a content service instance's workflow and its permissions.
	 * @param serviceInstanceDeserializationContext
	 * @param workflowSerializableConfig
	 * @throws PortalException
	 */
	public void deserialize(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, WorkflowSerializableConfig workflowSerializableConfig) throws PortalException;

	// SERIALIZATION
	
	/**
	 * Serialize a content service instance's workflow and its permissions.
	 * @param serviceInstanceSerializationContext
	 * @return
	 * @throws PortalException
	 */
	public WorkflowSerializableConfig serialize(ServiceInstanceSerializationContext serviceInstanceSerializationContext) throws PortalException;

	// GENERAL
	
	/**
	 * Set up a serialization context, defining settings such as class aliases, field aliases, transient fields, omitted collections etc.
	 * @param serviceInstanceBaseSerializationContext
	 */
	public void setupSerializationContext(ServiceInstanceBaseSerializationContext serviceInstanceBaseSerializationContext);
}
